package com.newbsd.web.maventest.controller;
/**
 * @author Mei
 */
import java.io.IOException;
import java.util.Iterator;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.newbsd.web.maventest.pojo.Manager;
import com.newbsd.web.maventest.service.ManagerService;
import com.newbsd.web.maventest.service.impl.ManagerServiceImpl;

/**
 * @author Mei
 */
@WebServlet("/ManagerServlet")
public class editAdminServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
   
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		doPost(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		
		ManagerService managerService = new ManagerServiceImpl();
		Manager manager= managerService.getAll();
	
		request.setAttribute("manager", manager);
		
		request.getRequestDispatcher("/Admin/editAdmin.jsp").forward(request, response);
	}

}
